package com.ah.shanxi_demo.sync.convert;

import java.util.HashMap;
import java.util.Map;
import static com.ah.shanxi_demo.sync.utils.MD5Utils.spring_md5;

/**
 * @author zt 2020/8/15
 */
public class ConvertSyncRequest {

    public static final String MD5Pro="md5;";

    /**
     * 注册接口 参数拼装
     * @return
     */
    public static Map<String,String> convert_sync_request_header(Map<String, Object> paramsMap){

        //加密md5
        String params_md5 = spring_md5(paramsMap);

        //请求头
        Map<String, String> headerMap = new HashMap<>();
//        headerMap.put("Content-Length", String.valueOf(paramsMap.toString().length()+100));
        headerMap.put("Content-Type", "application/json;charset=UTF-8");
        headerMap.put("Data-Check-Code", MD5Pro+params_md5);

        return headerMap;
    }

}
